package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: ProjectAddRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-08
 * @Version: 1.0
 * Table: pear_project
 * Comment:
 * 项目表
 */
public class ProjectAddRequestConvert extends BaseConvert {
    public static ProjectWithBLOBs convert(ProjectAddRequest request) throws Exception {
        ProjectWithBLOBs daoRequest = new ProjectWithBLOBs();
        copyProperties(request, daoRequest);

        daoRequest.setCover(daoRequest.getCover() == null ? null : daoRequest.getCover().trim());
        daoRequest.setName(daoRequest.getName() == null ? null : daoRequest.getName().trim());
        daoRequest.setCode(daoRequest.getCode() == null ? null : daoRequest.getCode().trim());
        daoRequest.setAccessControlType(daoRequest.getAccessControlType() == null ? null : daoRequest.getAccessControlType().trim());
        daoRequest.setWhiteList(daoRequest.getWhiteList() == null ? null : daoRequest.getWhiteList().trim());
        daoRequest.setTemplateCode(daoRequest.getTemplateCode() == null ? null : daoRequest.getTemplateCode().trim());
        daoRequest.setOrganizationCode(daoRequest.getOrganizationCode() == null ? null : daoRequest.getOrganizationCode().trim());
        daoRequest.setDeletedTime(daoRequest.getDeletedTime() == null ? null : daoRequest.getDeletedTime().trim());
        daoRequest.setPrefix(daoRequest.getPrefix() == null ? null : daoRequest.getPrefix().trim());
        daoRequest.setArchiveTime(daoRequest.getArchiveTime() == null ? null : daoRequest.getArchiveTime().trim());
        daoRequest.setTaskBoardTheme(daoRequest.getTaskBoardTheme() == null ? null : daoRequest.getTaskBoardTheme().trim());
        daoRequest.setBeginTime(daoRequest.getBeginTime() == null ? null : daoRequest.getBeginTime().trim());
        daoRequest.setEndTime(daoRequest.getEndTime() == null ? null : daoRequest.getEndTime().trim());
        daoRequest.setDescription(daoRequest.getDescription() == null ? null : daoRequest.getDescription().trim());

        return daoRequest;
    }
}
